package com.iscreen.dbupgrade.queries;

import java.util.List;

import com.iscreen.dbupgrade.objects.FieldType;
import com.iscreen.dbupgrade.objects.NewField;
import com.iscreen.utils.db.connection.DBConnection;
import com.iscreen.utils.exceptions.IScreenException;

//TODO should be changed to SchemaUtils
public abstract class QueryUtils
{
	protected DBConnection connection;
	
	protected QueryUtils(DBConnection connection)
	{
		this.connection = connection;		
	}
	
	public abstract String getFieldTypeSql(NewField field);
	public abstract FieldType getFieldType(String fieldTypeSql);
	public abstract Integer getFieldLength(String fieldTypeSql);
	public abstract List<NewField> getFields(String tableName) throws IScreenException;
}

